import Vue from "vue";
import Router from "vue-router";

Vue.use(Router);

const router = new Router({
    routes: [
        {
            path: "*",
            redirect: "/home",
        },
        {
            path: "/login",
            component: (resolve) => require(["@/views/login/login"], resolve),
            meta: { title: "登录" },
        },
        {
            path: "/register",
            component: (resolve) =>
                require(["@/views/register/register"], resolve),
            meta: { title: "注册" },
        },
        {
            path: "/retrieve",
            component: (resolve) =>
                require(["@/views/retrieve/retrieve"], resolve),
            meta: { title: "找回密码" },
        },
        {
            path: "/home",
            component: (resolve) =>
                require(["@/views/jssggxh/home/home"], resolve),
            meta: { title: "首页" },
        },
        {
            path: "/news/list",
            component: (resolve) =>
                require(["@/views/newsList/news-list"], resolve),
            meta: { title: "新闻列表" },
        },
        {
            path: "/about",
            component: (resolve) => require(["@/views/about/about"], resolve),
            meta: { title: "关于我们" },
        },
        {
            path: "/personal",
            component: (resolve) =>
                require(["@/views/personal/personal"], resolve),
            meta: { title: "个人中心" },
        },
        {
            path: "/jiangxiang",
            component: (resolve) =>
                require(["@/views/jiangxiang/jiangxiang"], resolve),
            meta: { title: "奖项申报" },
        },
        {
            path: "/jxdec",
            component: (resolve) => require(["@/views/jxdec/jxdec"], resolve),
            meta: { title: "奖项申报--详情" },
        },
        {
            path: "/grzz",
            component: (resolve) =>
                require(["@/views/jssggxh/grzz/zizhisqlist"], resolve),
            meta: { title: "技能资质" },
        },
        {
            path: "/grzz/dec",
            component: (resolve) =>
                require(["@/views/jssggxh/grzz/zizhisq"], resolve),
            meta: { title: "技能资质详情" },
        },
        {
            path: "/qyzz",
            component: (resolve) =>
                require(["@/views/jssggxh/qiyezz/zizhisq"], resolve),
            meta: { title: "企业资质" },
        },
        {
            path: "/jsgg/guanyuxh",
            component: (resolve) =>
                require(["@/views/jssggxh/gyxh/guanyuxiehui"], resolve),
            meta: { title: "江苏省-关于协会" },
        },
        {
            path: "/jsgg/hyzixun",
            component: (resolve) =>
                require(["@/views/jssggxh/hyzixun/hyzixun.vue"], resolve),
            meta: { title: "江苏省-行业资讯" },
        },
        {
            path: "/jsgg/dec",
            component: (resolve) =>
                require(["@/views/jssggxh/details/details.vue"], resolve),
            meta: { title: "江苏省-新闻详情" },
        },
        {
            path: "/hyzc",
            component: (resolve) =>
                require(["@/views/jssggxh/hyzc/huiyuanzc.vue"], resolve),
            meta: { title: "会员之窗" },
        },
        {
            path: "/hyzc/dec",
            component: (resolve) =>
                require(["@/views/jssggxh/hyzc/details.vue"], resolve),
            meta: { title: "江苏省-会员之窗详情" },
        },
        {
            path: "/zypx",
            component: (resolve) =>
                require(["@/views/jssggxh/zypx/zypx.vue"], resolve),
            meta: { title: "专业培训" },
        },
        {
            path: "/zypx/dec",
            component: (resolve) =>
                require(["@/views/jssggxh/zypx/details.vue"], resolve),
            meta: { title: "专业培训--详情" },
        },
        {
            path: "/video",
            component: (resolve) =>
                require(["@/views/jssggxh/video/video"], resolve),
            meta: { title: "视频专区" },
        },
        {
            path: "/zpzs",
            component: (resolve) =>
                require(["@/views/jssggxh/zpzs/index"], resolve),
            meta: { title: "作品展示" },
        },

        {
            path: "/video/dec",
            component: (resolve) =>
                require(["@/views/jssggxh/video/details"], resolve),
            meta: { title: "视频专区详情" },
        },
        {
            path: "/jrxh",
            component: (resolve) =>
                require(["@/views/jssggxh/jrxh/jrxh"], resolve),
            meta: { title: "加入协会" },
        },
    ],
});

export default router;
